#!/usr/bin/env node
const { program } = require("commander")
const options = require("./scripts/options")
const { createProjectAction, addComponentAction } = require("./scripts/actions")

//配置options
options()

//自定义command
program
  .command("create <project> [...others]")
  .description("create project into a folder, as: gcli create demo1")
  .action(createProjectAction)

program
  .command("add <cpnname> [...others]")
  .description("add vue component into a file, 比如: gcli add NavBar -d src/components")
  .action(addComponentAction)
//解析process.argv参数
program.parse(process.argv)

//获取额外的参数
//console.log(program.opts().dest);
